Platform Explorer / Nuxeo Platform LTS 2019 10.10

Component org.nuxeo.runtime.metrics.MetricsService

Documentation

Define CodeHale Metrics configuration.

Requirements

Resolution Order

832
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Start Order

972
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.

Implementation

Class: org.nuxeo.runtime.metrics.MetricsServiceImpl

Services

Extension Points

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.runtime.metrics.MetricsService">

  <documentation>
    Define CodeHale Metrics configuration.
  </documentation>

  <service>
    <provide interface="org.nuxeo.runtime.metrics.MetricsService" />
    <provide interface="com.codahale.metrics.MetricRegistry" />
  </service>

  <require>org.nuxeo.runtime.management.ServerLocator</require>
  
  <implementation class="org.nuxeo.runtime.metrics.MetricsServiceImpl" />

  <extension-point name="configuration">
    <documentation>
      The default configuration use metrics.* framework properties but
      you can override the configuration using a EP like this:

      <extension target="org.nuxeo.runtime.metrics.MetricsService" point="configuration">
      <metrics>
        <graphiteReporter enabled="true" periodInSecond="20"
          host="graphite.server.name" port="2003" prefix="servers.${hostname}.nuxeo."/>
        <csvReporter enabled="true" periodInSecond="10" outputDir="${metrics.csv.dir}" />
        <log4jInstrumentation enabled="true" />
        <tomcatInstrumentation enabled="true" />
      </metrics>
      </extension>

      Since 9.3, you can filter the list of metrics reported to Graphite. The ones enabled can be
      defined with the metrics.graphite.allowedMetrics property and the ones ignored with the
      metrics.graphite.deniedMetrics property.

      About the allowed metrics, if a metric name starts with any item of this list, then it will be reported.
      The 'ALL' value means that every metrics will be reported.
      About the denied metrics, if a metric name starts with any item of this list, then it will be ignored
      (unless it is part of the allowed metrics). The 'ALL' value means that every metrics will be ignored.

      These properties can be overridden with the previous extension point like this:

      <graphiteReporter enabled="true" periodInSecond="20" host="graphite.server.name" port="2003"
        prefix="servers.${hostname}.nuxeo.">
        <allowedMetrics>
          <metric>nuxeo.cache.user-entry-cache</metric>
          <metric>nuxeo.cache.group-entry-cache</metric>
        </allowedMetrics>
        <deniedMetrics>
          <metric>nuxeo.cache</metric>
          <metric>nuxeo.directories</metric>
        </deniedMetrics>
      </graphiteReporter>

    </documentation>
    <object class="org.nuxeo.runtime.metrics.MetricsDescriptor" />
  </extension-point>

</component>